#include <stdio.h>
#include <string.h>
#include <stdlib.h>

void print(char* s);
int main()
{
	char dest[50]={0};
	char* src="sixsstart";
	strcpy(dest,src);
	
	puts(dest);

    //"hello"===> 'h' 'e'  'l' 'l' 'o' '\0'
    printf("%d\n",sizeof("hello"));

    char name1[10]="zjd123";
    
    printf("%c\n",name1[0]);
    print(name1);
    //printf("%s\n",name1[0]);
    //表达式必须是可修改的左值C/C++(137)
    //name1="zjd456";

    char name2[10];
    //表达式必须是可修改的左值C/C++(137)
    //name2="jkl998";

    char h1[10]="hello";
    char h2[10]="hello";
    char h3[10]="hello";
    printf("%p\n",h1);
    printf("%p\n",h2);
    printf("%p\n",h3);

    system("pause");
	return 0;
} 

void print(char* s){
    printf("%s\n",s);
    printf("%c\n",s[1]);
    int i=0;
    for(i;i<strlen(s);i++){
        printf("s[%d]=%c\n",i,s[i]);
    }

    while(*s){
        printf("%c\n",*s);
        s++;
    }

}